class HomologacaosController < ApplicationController
  # GET /homologacaos
  # GET /homologacaos.xml
  def index
    @homologacaos = Homologacao.find(:all)

    respond_to do |format|
      format.html # index.html.erb
      format.xml  { render :xml => @homologacaos }
    end
  end

  # GET /homologacaos/1
  # GET /homologacaos/1.xml
  def show
    @homologacao = Homologacao.find(params[:id])

    respond_to do |format|
      format.html # show.html.erb
      format.xml  { render :xml => @homologacao }
    end
  end

  # GET /homologacaos/new
  # GET /homologacaos/new.xml
  def new
    @homologacao = Homologacao.new

    respond_to do |format|
      format.html # new.html.erb
      format.xml  { render :xml => @homologacao }
    end
  end

  # GET /homologacaos/1/edit
  def edit
    @homologacao = Homologacao.find(params[:id])
  end

  # POST /homologacaos
  # POST /homologacaos.xml
  def create
    @homologacao = Homologacao.new(params[:homologacao])

    respond_to do |format|
      if @homologacao.save
        flash[:notice] = 'Homologacao was successfully created.'
        format.html { redirect_to(@homologacao) }
        format.xml  { render :xml => @homologacao, :status => :created, :location => @homologacao }
      else
        format.html { render :action => "new" }
        format.xml  { render :xml => @homologacao.errors, :status => :unprocessable_entity }
      end
    end
  end

  # PUT /homologacaos/1
  # PUT /homologacaos/1.xml
  def update
    @homologacao = Homologacao.find(params[:id])

    respond_to do |format|
      if @homologacao.update_attributes(params[:homologacao])
        flash[:notice] = 'Homologacao was successfully updated.'
        format.html { redirect_to(@homologacao) }
        format.xml  { head :ok }
      else
        format.html { render :action => "edit" }
        format.xml  { render :xml => @homologacao.errors, :status => :unprocessable_entity }
      end
    end
  end

  # DELETE /homologacaos/1
  # DELETE /homologacaos/1.xml
  def destroy
    @homologacao = Homologacao.find(params[:id])
    @homologacao.destroy

    respond_to do |format|
      format.html { redirect_to(homologacaos_url) }
      format.xml  { head :ok }
    end
  end
end
